// /!*BASE*!/
import React, { Component } from 'react';
import { HashRouter, Switch, Route, Redirect, withRouter } from 'react-router-dom';

// /!*REDUX STORE*!/
import { Provider } from 'react-redux';
import store from './store/index';

// /!*ANTD*!/

// /!*IMPORT CSS*!/
import './static/css/reset.min.css';
import './static/css/common.less';

// /!*IMPORT COMPONENT*!/
import NavTop from './component/NavTop';
import NavBottom from './component/NavBottom';
import Candidate from './routes/Candidate';
import Person from './routes/Person';

class App extends Component {
  constructor(props, context) {
    super(props, context);

    //=>STATE
    this.state = {
      isLogin: false
    };
  }
  render() {
    return (
      <div>
        <Provider store={store}>
          <HashRouter>
            <div>
              <NavTop />

              <main className='container'>
                <Switch>
                  <Route path='/candidate' component={Candidate} />
                  <Route path='/person' component={Person} />
                  <Redirect to='/candidate' />
                </Switch>
              </main>

              <NavBottom />
            </div>
          </HashRouter>
        </Provider>
      </div>
    );
  }
}

export default App;